#ifndef _SETTINGS_H_
#define _SETTINGS_H_

#include <iostream>
#include <Windows.h>
#include <process.h>
#include <cstdlib>
#include <ctime>
#include <fstream>
#include <string>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <sstream>
#include "Food.h"
#include "ixion.h"
#include "snake.h"
using std::make_pair;
using std::pair;
using std::cout;
using std::endl;
using std::ifstream;
using std::ofstream;
using std::string;
using std::ostringstream;
using std::left;
using std::setw;
using std::vector;
using std::cin;
using std::sort;

 

#define TITLE_DISPLAY_TIME 5000
#define filename "HighScores.txt"
#define MAX_HIGH_SCORES 10
#define WIDTH 45
#define HEIGHT 20
#define WIDTH_MIN 10
#define HEIGHT_MIN 0
#define STARTING_SNAKE_POS_X 5
#define STARTING_SNAKE_POS_Y 5
#define GAME_SPEED_RATE 0.833

#define DEFAULT_STARTING_SNAKE_SIZE  5
#define DEFAULT_STARTING_GAMESPEED 250
#define DEFAULT_STARTING_LEVEL 1
#define DEFAULT_STARTING_LEVEL_DIF 5


#define NEW_HIGH_SCORE_X 4
#define NEW_HIGH_SCORE_Y 9
#define NEW_HIGH_SCORE_NAME_X 6
#define NEW_HIGH_SCORE_NAME_Y 10
#define GAME_OVER_X 7
#define GAME_OVER_Y 8
#define PLAY_AGAIN_X 4
#define PLAY_AGAIN_Y 12
#define THANK_YOU_X 1
#define THANK_YOU_Y 12
#define END_CURSOR_X 0
#define END_CURSOR_Y 24
#define STATS_BAR_X 13
#define STATS_BAR_Y 23
#define HIGH_SCORE_BOARD_Y 2
#define HIGH_SCORE_BOARD_X (WIDTH + 5)
#define FOOD_POS_X (12 + STATS_BAR_X)
#define FOOD_POS_Y 23
#define LEVEL_POS_X (4 + STATS_BAR_X)
#define LEVEL_POS_Y 23
#define SCORE_POS_X (22 + STATS_BAR_X)
#define SCORE_POS_Y 23

#define SCORE_ALGORITHM (10 + 3 * ( food_eaten / Game_Settings::LEVEL_DIF )  - int( clock() - cycle_start ) / CLOCKS_PER_SEC ) * ( food_eaten / Game_Settings::LEVEL_DIF + 1 )
#define RANDOM_FOOD_

//global synchronization variables
struct Game_Settings
{
public:
	static unsigned SNAKE_SIZE;
	static unsigned MASTER_GAMESPEED;
	static unsigned MASTER_GAME_LEVEL;
	static unsigned MASTER_LEVEL_DIF;
	static unsigned LEVEL_DIF;
	static unsigned GAME_SPEED ;
	static unsigned LEVEL;
	static unsigned player_score;
	static bool 	FINISH;
	static HANDLE 	hMutex;
};



#endif